package sctu.edu.java.year2016.team02.wanggaowen.day20160601.Chapter9_1;

import com.sun.scenario.effect.Identity;

/**
 * Created by 15c on 2016/6/1.
 */

public class Work9_1 {
    int i;
    int b;

    public Work9_1(int c) {
        b = c;
        i = 1;
    }

    public class In {        //内部类
      int sum=0;
        public void getSum() {
            for (int i = 1; i <= b; i++) {
               sum += i ;
            }
            System.out.print("1+...+"+b+"="+sum );
        }
    }
    In in = new In();//实例化内部类的对象；
}